﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Guline.SupportCMS.Models.Object
{
    public class TemplateHook
    {
        [Key]
        public int ID { get; set; }

        public string Name { get; set; }

        public bool Enable { get; set; }

        public Nullable<int> Order { get; set; }

        public Nullable<int> StyleID { get; set; }
        [ForeignKey("StyleID")]
        public virtual Style Style { get; set; }

        public string ItemID { get; set; }
        public string Description { get; set; }
        public string Content { get; set; }

        public Nullable<int> ParentID { get; set; }
        [ForeignKey("ParentID")]
        public virtual TemplateHook Parent { get; set; }

        [InverseProperty("Parent")]
        public virtual ICollection<TemplateHook> Childrens { get; set; }

        public string Param1 { get; set; }//num of display
        public string Param2 { get; set; }
        public string Param3 { get; set; }
        public string Param4 { get; set; }

        public int TemplateID { get; set; }
        [ForeignKey("TemplateID")]
        public virtual Template Template { get; set; }
    }
}